#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int End = 0;
	scanf("%d", &End);
	while (End != 1)
	{
		if (End % 2 == 1)
		{
			printf("%d*3+1=%d\n", End,End * 3 + 1);
			End = End * 3 + 1;
		}
		else if(End % 2 == 0)
		{
			printf("%d=%d/2\n", End/2,End);
			End /= 2;
		}
	}
	printf("End\n");
	return 0;
}